package Bean;

import java.math.BigDecimal;

public class Furn {
    // 图片的路径
    //Integer可以传空，int不能
    // 防止空指针
    private Integer id;
    private String FurnName;
    // 商家
    private String Merchant;
    //BigDecimal 指定特殊精度，比Double好
    // 也防止空指针
    private BigDecimal Price;
    //销量
    private Integer Volume;
    // 库存
    private Integer inventory;
    //隐藏坑 字段名与数据库名不一致，要特殊解决
    private String imgPath = "web/assets/images/product-image/default.jpg";
    public Furn(){

    }
    public Furn(Integer id, String furnName, String merchant, BigDecimal price, Integer volume, Integer inventory, String imgPath) {
        this.id = id;
        FurnName = furnName;
        Merchant = merchant;
        Price = price;
        Volume = volume;
        this.inventory = inventory;
        if (!(null == imgPath || "".equals(imgPath))){
            this.imgPath = imgPath;
        }
    }

    public Integer getId() {
        return id;
    }

    @Override
    public String toString() {
        return "Furn{" +
                "id=" + id +
                ", FurnName='" + FurnName + '\'' +
                ", Merchant='" + Merchant + '\'' +
                ", Price=" + Price +
                ", Volume=" + Volume +
                ", inventory=" + inventory +
                ", imgPath='" + imgPath + '\'' +
                '}';
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFurnName() {
        return FurnName;
    }

    public void setFurnName(String furnName) {
        FurnName = furnName;
    }

    public String getMerchant() {
        return Merchant;
    }

    public void setMerchant(String merchant) {
        Merchant = merchant;
    }

    public BigDecimal getPrice() {
        return Price;
    }

    public void setPrice(BigDecimal price) {
        Price = price;
    }

    public Integer getVolume() {
        return Volume;
    }

    public void setVolume(Integer volume) {
        Volume = volume;
    }

    public Integer getInventory() {
        return inventory;
    }

    public void setInventory(Integer inventory) {
        this.inventory = inventory;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }
}
